import requests
from bs4 import BeautifulSoup


class exp:

    def huoqu(self):

        for i in range(1,11):
            page = (i-1)*25
            res = requests.get('https://movie.douban.com/top250?start='+str(page)+'&filter=')

            html = res.text

            bs = BeautifulSoup(html,'html.parser')

            pageInfo = bs.find_all(class_='item')

            for item in pageInfo:

                num = item.find('em',class_="").text

                name = item.find('span',class_='title').text

                href = item.find('a')['href']

                mark = item.find('span',class_="rating_num").text

                content = item.find('span',class_="inq").text


                print(num+'、电影名称：'+name+", 评分："+mark+", 电影评语："+content+", 电影链接："+href)


a = exp()
a.huoqu()